package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.Map;

public class DbBack {
    private String id;

    private String backName;

    private String backStatus;

    private String backSize;

    private String backTime;

    private String backPath;

    private String status;

    private Date createTime;


    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("1", "成功", "2", "失败");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getBackName() {
        return backName;
    }

    public void setBackName(String backName) {
        this.backName = backName == null ? null : backName.trim();
    }

    public String getBackStatusCn() {
        return STATUSMAP.get(getBackStatus());
    }

    public String getBackStatus() {
        return backStatus;
    }

    public void setBackStatus(String backStatus) {
        this.backStatus = backStatus == null ? null : backStatus.trim();
    }

    public String getBackSize() {
        return backSize;
    }

    public void setBackSize(String backSize) {
        this.backSize = backSize == null ? null : backSize.trim();
    }

    public String getBackTime() {
        return backTime;
    }

    public void setBackTime(String backTime) {
        this.backTime = backTime == null ? null : backTime.trim();
    }

    public String getBackPath() {
        return backPath;
    }

    public void setBackPath(String backPath) {
        this.backPath = backPath == null ? null : backPath.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}
